package gui.win.para;

import core.utils.EPara;
import gui.Segl1;
import gui.utils.Borders;
import gui.utils.Slider;
import gui.utils.SliderWrap;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;

/*Author: John Archer, Contact: john.archer.jpa@gmail.com*/
public class Kmers extends JFrame{
    public Kmers(Segl1 Seg_L1){
        super();
        this.setLocation(Seg_L1.getLocationOnScreen().x + 50, Seg_L1.getLocationOnScreen().y + 50);
        this.setLayout(new FlowLayout());
        this.setSize(new Dimension(400, 170));
        JPanel p = new JPanel();
        p.setBorder(Borders.getTitledBorder(Borders.STANDARD_TITLED_BORDER, "MATCHING"));
        p.setLayout(new BorderLayout());

        JPanel p1 = new JPanel();
        p1.setLayout(new BorderLayout());
        p1.add(new SliderWrap(Slider.KMER_LEN, 10, 3, EPara.KMER_LEN, "K-mer Size", 260, 3), BorderLayout.NORTH);
        p1.add(new SliderWrap(Slider.KMER_DENSITY, 10, 0, EPara.KMER_DENS, "K-mer Density", 260, 3), BorderLayout.SOUTH);
        p.add(p1, BorderLayout.NORTH);

        JPanel p2 = new JPanel();
        p2.setLayout(new BorderLayout());
        p2.add(new SliderWrap(Slider.WORD_SKIP, 10, 1, EPara.WORD_SKIP, "K-mer Skip", 260, 3), BorderLayout.NORTH);

        p.add(p2, BorderLayout.SOUTH);
        this.add(p, BorderLayout.CENTER);
        this.add(new Buttons(this), BorderLayout.SOUTH);
        this.setVisible(true);
        this.setAlwaysOnTop(true);
    }
    public void closeFrame(){this.dispose();}
}
